package org.qiyu.live.account.provider.rpc;

import jakarta.annotation.Resource;
import org.apache.dubbo.config.annotation.DubboService;
import org.qiyu.live.account.provider.service.IAccountTokenService;
import qiyu.live.account.interfaces.IAccountTokenRpc;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: sfx
 * Date: 2023-10-04
 * Time: 11:04
 */
@DubboService
public class IAccountTokenRpcImpl implements IAccountTokenRpc {

    @Resource
    private IAccountTokenService accountTokenService;

    @Override
    public String createAndSaveLoginToken(Long userId) {
        return accountTokenService.createAndSaveLoginToken(userId);
    }

    @Override
    public Long getUserIdByToken(String token) {
        return accountTokenService.getUserIdByToken(token);
    }
}